#include <stdio.h>
int sum(int m,int n)
{int sum=0;
sum=(m+n)*(n-m+1)/2;
 return sum;
}
int main()
{int m,n;
scanf("%d %d",&m,&n);
printf("%d",sum(m,n));

    return 0;
}
